package itheima.zuoye.test2;

import java.util.Scanner;

public class Test {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        System.out.println("请输入支付方式：[WeChat,Alipay,Bank]");
        String type = sc.next();
        System.out.println("请输入支付金额：");
        int money = sc.nextInt();
        Payment pay = Factory.getInstance(type);
        if (pay != null)
        {pay.pay(money);
            System.out.println("支付完成,支付金额："+ money);}



    }
}
